<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<style>
    .box, .box2{
        width: 200px;
        height: 200px;
        border: 1px solid grey;
        position: relative;
    }

    .box1 {
        width: 100px;
        height: 100px;
        background-color: red;
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
    }
    .my {
        border: 1px solid #ccc;
        width: 50px;
        height: 50px;
        position: absolute;
        margin: auto;
        top: 0;
        bottom: 0;
        right: 0;
        left: 0;

        width: 50px;
        display: -webkit-box;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
        overflow: hidden;
    }
</style>
<body>
    <div class="box" >
        <div class="box1" ></div>
    </div>

    <div class="box2" >
        <div class="my" ></div>
    </div>

    <script>
       const a = 1
       // a = 6
       console.log("a:", a)

       const obj = {
           a: 1,
           b: {
               c: 2
           }
       }

       obj.a = 8

       console.log('obj:', obj)
       
       function aFn() {
           console.log("aFn")
       }
       setInterval(() => {
        aFn()
       }, 1000)

       
    </script>
</body>
</html>